package com.zs.hydrant.service.impl;

import com.zs.hydrant.entity.Feedback;
import com.zs.hydrant.mapper.FeedbackMapper;
import com.zs.hydrant.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class FeedbackServiceImpl implements FeedbackService {
    @Autowired
    private FeedbackMapper feedbackMapper;

    @Override
    public boolean submitFeedback(Feedback feedback) {
        return feedbackMapper.addFeedback(feedback) > 0;
    }

    @Override
    public List<Feedback> getByStatus(Integer status) {
        return feedbackMapper.getByStatus(status);
    }

    @Override
    public void updateStatus(Integer feedbackId, Integer status) {
        feedbackMapper.updateStatus(feedbackId, status);
    }
}